package com.vpclub.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @author : leimingchao
 * @date Date : 2021年07月05日 22:11
 */

/**
 * 监听项目的启动与停止
 */
public class UserListener implements ServletContextListener {

    /**
     * 监听ServletContext启动初始化
     * @param servletContextEvent
     */
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        ServletContext servletContext = servletContextEvent.getServletContext();
        System.out.println("UserListener.......contextInitialized....");
    }

    /**
     * 监听ServletContext销毁
     * @param servletContextEvent
     */
    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
        System.out.println("UserListener.......contextDestroyed....");
    }
}
